package com.tianyi.sfzy1.controller;

import com.tianyi.sfzy1.domain.Chargeassociation;
import com.tianyi.sfzy1.service.ChargeAssociationService;
import com.tianyi.sfzy1.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/chargeAssociation")
public class ChargeAssociationController {
    @Autowired
    private ChargeAssociationService chargeAssociationService;
    @PutMapping("/insertOrUpdateChargeAssociation")
    public R insertOrUpdateChargeAssociation(@RequestBody List<Chargeassociation> chargeassociationList){
        return R.ok(chargeAssociationService.insertOrUpdateChargeAssociation(chargeassociationList));
    }

}
